package lee.lxwei.boot.listener;

import com.alibaba.fastjson.JSON;
import lee.lxwei.boot.domain.UserRegistEvent;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

/**
 * 用户注册事件监听器
 */
@Slf4j
@Component
public class UserRegistListener implements ApplicationListener<UserRegistEvent> {

    @Override
    public void onApplicationEvent(UserRegistEvent userRegistEvent) {

        log.info("用户注册事件 {}", JSON.toJSONString(userRegistEvent));

    }

}
